package com.gc.db;

import java.util.List;

public class Tables {
	private String name;
	private String lowcasename;
	private List<Columns> colums;
	private Columns pkColumns;
	
	private String add = "false";
	private String del = "false";
	private String update = "false";
	private String getOne = "false";
	private String getAll = "false";
	
	
	
	
	public Tables() {
	}

	public String getLowcasename() {
		String first = (name.charAt(0)+"").toLowerCase();
		String last = name.substring(1).toLowerCase();
		return first+last;
	}

	public void setLowcasename(String lowcasename) {
		this.lowcasename = lowcasename;
	}

	public Tables(String name, List<Columns> colums) {
		this.name = name;
		this.colums = colums;
	}
	public String getName() {
		name = name.replaceAll("_","");
		String first = (name.charAt(0)+"").toUpperCase();
		String last = name.substring(1).toLowerCase();
		return first+last;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<Columns> getColums() {
		return colums;
	}
	public Columns getPkColumns() {
		if(pkColumns == null){
			pkColumns = new Columns("id","String","");
		}
		return pkColumns;
	}
	public void setPkColumns(Columns pkColumns) {
		this.pkColumns = pkColumns;
	}
	public void setColums(List<Columns> colums) {
		this.colums = colums;
	}
	public String getAdd() {
		return add;
	}
	public void setAdd(String add) {
		this.add = add;
	}
	public String getDel() {
		return del;
	}
	public void setDel(String del) {
		this.del = del;
	}
	public String getUpdate() {
		return update;
	}
	public void setUpdate(String update) {
		this.update = update;
	}
	public String getGetOne() {
		return getOne;
	}
	public void setGetOne(String getOne) {
		this.getOne = getOne;
	}
	public String getGetAll() {
		return getAll;
	}
	public void setGetAll(String getAll) {
		this.getAll = getAll;
	}
	
	
}
